<?php
//
//$productid = intval($_POST['productid']);
//$num = intval($_POST['num']);
//session_start();
//$userid = $_SESSION['memberid'];
//
//    $sql = "select iPrice from imooc_pro WHERE id={$productid}";
//    $rows = fetchAll($sql);
//    var_dump($rows);

/**
 * 根据用户名获取该用户的所有购物车记录
 * @param $cid
 * @return multitype
 */
function getallcartform($cid){
    $sql = "select p.id,p.pName,p.pSn,p.pNum,p.mPrice,p.iPrice,p.pDesc,p.pubTime,p.isShow,p.isHot,c.cName,p.cId from imooc_pro as p join imooc_cate as c on p.cId = c.id where p.cId={$cid}" ;
    $rows = fetchAll($sql);
    return $rows;
}

